package com.ahaoyou.thread;

import java.util.concurrent.locks.LockSupport;

public class ThreadStateTest {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                LockSupport.park();
            }
        });
        System.out.println("线程状态:" + thread.getState());
        thread.start();
        System.out.println("线程状态：" + thread.getState());
        Thread.sleep(100);
        System.out.println("线程状态：" + thread.getState());
    }
}